package com.example.educationsystem.dao;

import com.example.educationsystem.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {

    //查询家里所有家庭成员
    List<User> getUser();


//通过用户名字查询用户的信息
    User selectUserByUsername(@Param("userName") String userName);

//通过家庭编号，查询家庭所有成员
    List<User> getUserByUserFamily(@Param("userFamily") Integer userFamily);

    int updateuser(@Param("userId") Integer userId,@Param("userCall") String userCall,@Param("userName") String userName,@Param("userAge") Integer userAge);

    int deleteuser(@Param("userId") Integer userId);

}
